Skip to content

SDX2 System Map 0.1.0 - #367

Closed
ryancrimsonrd-ux wants to merge 4 commits into
StarCpt:mainfrom
ryancrimsonrd-ux:add-sdx2-system-map
Closed

ryancrimsonrd-ux wants to merge 4 commits into
StarCpt:mainfrom
ryancrimsonrd-ux:add-sdx2-system-map

Conversation

@ryancrimsonrd-ux

Copy link
Copy Markdown
Contributor

New plugin: SDX2 System Map 0.1.0

  • Source: https://github.com/ryancrimsonrd-ux/SDX2_SystemMap (commit 66c3fa1ed8aefc136e0eebdad4899c23db790983)
  • Client only, Windows, CLR and CoreCLR.
  • A system map and route planner beside Flip and Burn's nav list on the Sigma Draconis Expanse 2 server, with an optional hand-off of the route to a programmable-block autopilot.
  • Read-only: no network calls, no chat commands; it pauses itself in admin mode, spectator and when AFK.
  • Settings window from Pulsar's Config button or Ctrl+Alt+/.
  • Built and checked the way Pulsar compiles it (ClientPlugin + Core, no LOCAL_BUILD) for net48 and net10.0; test.py passes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@viktor-ferenczi viktor-ferenczi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope: new registration, hub PR head b02c3c21cea860d118534477cd7a49ce60a4f30a, Plugins/SDX2_SystemMap.xml, ryancrimsonrd-ux/SDX2_SystemMap at 66c3fa1ed8aefc136e0eebdad4899c23db790983. Full-repository review: all 46 tracked paths at the pin.

Summary: No security findings. One Medium: the plugin is active in every world, not only on SDX2, and its default key M is the game's default symmetry key, so toggling symmetry while building on any server also toggles an SDX2 map overlay. The manifest says it "does nothing elsewhere". Please gate it on Flip and Burn being present.

Manifest

  • GitHubPlugin, new Id 9486EC98-8DC5-4BDC-940E-CD37E27AFCE4 (unique in the hub), SourceDirectories ClientPlugin + Core, no NuGetReferences, Runtimes CLR,CoreCLR, Platforms Windows. Hub test.py Plugins at the PR head prints "All files validated".
  • The repository's own SDX2_SystemMap.xml matches the hub entry apart from comments and the placeholder <Commit>.

Repository and pin provenance

  • Public, not a fork, MIT license (GitHub detects MIT; copyright "Protogen Systems"). Created 2026-11-16, two commits; the pin is main HEAD (compare: identical). The owner ryancrimsonrd-ux opened this PR.
  • No submodules, symlinks, LFS objects, archives or committed binaries/native files.
  • The project file references 47 game DLLs, all through $(Bin64Dir) (the game install), plus the IDE-only Lib.Harmony 2.4.2 PackageReference, which Pulsar supplies. Directory.Build.props only locates the game install (registry/libraryfolders.vdf). Deploy-LocalDev.ps1 and the csproj DeployPlugin target copy a local build into %APPDATA%\Pulsar\<edition>\Local; neither runs on the hub path.
  • PB Autopilot/ (an in-game PB script plus an offline flight-sim harness) and Tests/ (offline maths checks and a GDI preview renderer) are outside SourceDirectories, so the hub doesn't compile them.

Security

  • No networking, Process, P/Invoke, unsafe, threads/tasks, dynamic code or assembly loading in ClientPlugin/ or Core/. Core/ is game-free: its files use only System, System.Collections.Generic, System.Globalization, System.Text and, in MapSettings only, System.IO.
  • Filesystem: one file, MyFileSystem.UserDataPath/Storage/SDX2_SystemMap.ini (Plugin.SettingsPath, MapSettings.Load/Save), parsed as plain key=value with clamped values.
  • Reflection targets fixed type and member names in the Flip and Burn (FlipAndBurn.*) and Spectrum (Spectrum.Session) mod script assemblies found through MyScriptManager.Static.Scripts (FlipAndBurnLink.Search, SpectrumLink.Search). The one Activator.CreateInstance builds a private instance of F&B's own asteroid scanner type from that fixed field. Nothing is selected by external input.
  • What it changes, all on this client: Harmony postfixes on MyGuiScreenGamePlay.Draw and MyStatControlledEntitySpeed.Update (the m_currentValue/m_valueStringCache fields are on MyStatBase, game 1.211.017), a runtime prefix on F&B's NavigationMenu.SelectEntry, F&B's destination via its own OnSelect delegate, detour points added through F&B's SetPointsOfInterest mod API (channel 9806650), and two toolbar actions on ship controllers. The PR text calls the plugin read-only; it also writes the [SDX2 Route] section of the Custom Data of PBs on the controlled grid that pass HasLocalPlayerAccess() (AutopilotLink), which syncs through the game's normal Custom Data path.
  • Harmony Id SDX2_SystemMap; Dispose calls UnpatchAll(Id), which also removes the runtime F&B patch.

Compatibility / authority

  • Data it reads: your controlled grid, your GPS list, F&B's selection and speed state, and Spectrum's figures for your own ship (ClientSelfEmission, which the server already sends for Spectrum's HUD). Nothing about other players' grids.
  • Asteroids come from F&B's own procedural scanner, limited to F&B's own 30 s look-ahead at your current speed (AsteroidWatch), applied along the planned route as well as along your velocity.
  • The autopilot is an ordinary PB script running under the server's script rules; the plugin only writes Custom Data you could type yourself. I found no path that gets past server authority.
  • PlayGuard pauses everything in creative tools, any admin toggle, the admin menu, spectator and after 30 s without input (PlayGuard.Check).
  • Re-registering the toolbar actions on each world load is correct: MySession.Unload calls MyTerminalControlFactory.Unload(), which clears the static control lists (game 1.211.017).

From-source build

Built ClientPlugin + Core on Linux with .NET SDK 10.0.400 against the game 1.211.017 Bin64, without LOCAL_BUILD (so AssemblyVersion.cs supplies the version) and with SDK assembly-info generation off, for net10.0 and net48: 0 warnings, 0 errors each. This is an SDK build, not Pulsar's Roslyn path, and no runtime load test was run (Platforms is Windows, and the features need SDX2's mods).

Findings

Medium: active in every world, and the default key collides with the game's symmetry key

Plugin.Update runs SidePreview.Update in any session; nothing checks that Flip and Burn was found. SidePreview.HandleKeys toggles Visible on the preview key (default M), and SidePreview.Draw then draws the SDX2 map, with a "Flip and Burn not detected" panel when F&B is missing. M is the game's default SYMMETRY_SWITCH (MySandboxGame default controls, game 1.211.017), and KeysFree only checks for the gameplay screen, chat and F&B's search box. So on any server, setting up symmetry while building also pops the SDX2 map over the build view, and Shift/Ctrl/Alt+M open the full map, autopilot notices or the pinned map. With Pip=true saved, the pinned map also shows at every world load (SidePreview.Start), and the two "System Map" toolbar actions are added to every cockpit in every world (ToolbarActions.Register). The manifest description tells players it "does nothing elsewhere".

Fix: once FlipAndBurnLink.Search has run for a while without finding F&B, skip key handling, drawing, PiP and the toolbar registration for that session (the speedometer postfix already falls back to physics speed). Picking a default key that the game doesn't bind would also help SDX2 players, who hit the same overlap there. If you'd rather keep it on everywhere, change the description to say so.

Non-blocking notes

  • <Platforms>Windows</Platforms> hides the plugin from Proton and Linux players. I found nothing Windows-specific in the hub-compiled code, and the net10.0 build on Linux is clean. Widening it to Windows;Proton;Linux is worth a try once someone has run it there.
  • KeepNavOpen.SelectPrefix re-implements F&B's SelectEntry and skips the original whenever "keep the list open" is on (the default). If an F&B update adds work to SelectEntry, the plugin will drop it without any log line. A check of the method's shape when patching, or a transpiler that only removes the trailing Close() call, would fail loudly instead.

ryancrimsonrd-ux added a commit to ryancrimsonrd-ux/SDX2_SystemMap that referenced this pull request Nov 17, 2026
Review feedback on StarCpt/PluginHub#367:
- WorldGate: the plugin only runs in worlds with Flip and Burn (2832248541)
  in the mod list, or whose F&B scripts turn up within a minute. Elsewhere:
  no keys, drawing, pinned map, toolbar actions or speed-dial fix.
- M alone is the game's symmetry key, so it no longer does anything here.
  Shift+M cycles map window -> full map -> off.
- Every key is a binding (KeyMap, KeyAutopilot, KeyPin, KeySteer,
  KeySettings) set from the settings window: click, then press the keys.
  Modifiers must match exactly. An old PreviewKey carries over.
- The keep-open patch checks F&B's SelectEntry still makes only the calls
  it replaces, and logs and skips the patch if not.
- The settings window is now two columns with a KEYS section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryancrimsonrd-ux and others added 3 commits November 16, 2026 19:09
Pin 98c6d838d966bbd6a78e9f5c3c7aa9926f6f59b4. Addresses the review: the
plugin only runs in worlds with Flip and Burn, M alone is left to the game
(Shift+M cycles the map), every key is rebindable, and the description no
longer says it "does nothing elsewhere".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…clash warnings)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryancrimsonrd-ux

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review. Changes are in f54decf (hub pin updated):

  • Active in every world: at load the plugin checks the world's mod list for Flip and Burn (2832248541). For local copies, it looks for F&B's scripts for up to a minute instead. Without F&B it stays fully off: no key handling, drawing, PiP or toolbar actions, and the speedometer postfix returns early. Only the settings window still opens.
  • M and symmetry: plain M does nothing now, so the symmetry key is untouched. Shift+M cycles map window, full map, off. Every binding can be changed in the settings window and fires only with its exact modifiers. Choosing a combo the player's game controls already use asks first, and clashes show a HUD warning at world load.
  • The description now says it stays off in worlds without Flip and Burn.
  • KeepNavOpen: before patching, the plugin checks that SelectEntry only calls what the prefix re-implements. If F&B adds anything, it logs it and skips the patch, so the list just closes on a pick.
  • Platforms: I'll add Proton/Linux once someone has run it there.

Also since your review: an "only in a cockpit" option, a default zoom setting, and a fix so the AFK pause also triggers with a controller connected. Previously a pad whose sliders aren't centred never counted as idle.

@ryancrimsonrd-ux
ryancrimsonrd-ux marked this pull request as draft November 17, 2026 03:42
@ryancrimsonrd-ux

Copy link
Copy Markdown
Contributor Author

I've put this back to draft: please don't merge it yet. The map is built for the Sigma Draconis Expanse 2 server, and I'm waiting for their staff to approve it for use there. Review feedback is still welcome in the meantime. I'll mark it ready once they've approved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants